package cn.hd.dao;

import cn.hd.entity.Role;
import cn.hd.entity.User;
import org.apache.ibatis.annotations.Param;


import java.util.List;
import java.util.Map;

public interface RoleDao {
    public List<Role> selectAll();
    public List<User> selectUsersByRoleId(long id);
    public List<Role> selectAllBN(Map map);

    public int addRole(Role role);
    public int deleteRole(long roleId);
    public int updateRole(Role role);
    public Role selectByRid(long rid);
//根据rid删除中间表中的数据
    public int deleteRolePower(long rid);
    //加入中间表
    public int insertRolePower(@Param("rid") long rid, @Param("pid") long pid);

}
